package com.xvyy.tingshu.album.client;

import com.xvyy.tingshu.album.client.impl.AlbumInfoDegradeFeignClient;
import com.xvyy.tingshu.common.result.Result;
import com.xvyy.tingshu.model.album.AlbumInfo;
import com.xvyy.tingshu.model.album.BaseCategory3;
import com.xvyy.tingshu.model.album.BaseCategoryView;
import com.xvyy.tingshu.model.album.TrackInfo;
import com.xvyy.tingshu.vo.album.AlbumStatVo;
import com.xvyy.tingshu.vo.album.TrackListVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;


/**
 * <p>
 * 产品列表API接口
 * </p>
 *
 * @author qy
 */
@FeignClient(value = "service-album",
        path = "/api/inner/albumInfo",
        contextId = "albumInfoFeignClient",
        fallback = AlbumInfoDegradeFeignClient.class)
public interface AlbumInfoFeignClient {

    @GetMapping("/getAlbumInfo/{albumId}")
    Result<AlbumInfo> getAlbumInfo(@PathVariable(value = "albumId") Long albumId);

    @GetMapping("/getAlbumInfoCategory/{albumId}")
    Result<BaseCategoryView> getAlbumInfoCategory(@PathVariable(value = "albumId") Long albumId);

    @GetMapping("/getAlbumInfoStat/{albumId}")
    Result<AlbumStatVo> getAlbumInfoStat(@PathVariable(value = "albumId") Long albumId);

    @GetMapping("/getC1Id7TopBaseCategory3List/{c1Id}")
    Result<List<BaseCategory3>> getC1Id7TopBaseCategory3List(@PathVariable(value = "c1Id") Long c1Id);

    @GetMapping("/getCategory1IdList")
    Result<List<Long>> getCategory1IdList();

    @PostMapping("/trackListVo")
    Result<List<TrackListVo>> getTrackListVo(@RequestBody List<Long> collectTrackIdList);

    @GetMapping("/getAlbumInfoIdList")
    Result<List<Long>> getAlbumInfoIdList();

    @GetMapping("/getTrackInfoById/{trackId}")
    Result<TrackInfo> getTrackInfoById(@PathVariable(value = "trackId") Long trackId);

    @GetMapping("/getPaidTrackAndFilterCanPayTrack/{albumId}/{userId}/{trackCount}/{trackId}")
    Result<List> getPaidTrackAndFilterCanPayTrack(
            @PathVariable(value = "albumId") Long albumId,
            @PathVariable(value = "userId") Long userId,
            @PathVariable(value = "trackCount") Integer trackCount,
            @PathVariable(value = "trackId") Long trackId);
}